package cn.kgc.zuxin.controller;

import cn.kgc.zuxin.common.R;
import cn.kgc.zuxin.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/test")
public class TestController {



    @RequestMapping
    @ResponseBody
    public  Map<String,Map<String,Object>> addTest(){
        List<User> userList=new ArrayList<>();
        User user=new User(1L,"张三","17633107640","男","idnumber","作者",1) ;
        User user1=new User(2L,"张三","17633107640","男","idnumber","作者",1) ;
        User user2=new User(3L,"张三","17633107640","男","idnumber","作者",1) ;
        userList.add(user);
        userList.add(user1);
        userList.add(user2);
        Map<String,Object> map=new HashMap<String,Object>();
        map.put("2",user);

        map.put("1",2);
        Map<String,Map<String,Object>> map1=new HashMap<>();
        map1.put("1",map);

        return map1;
    }
}
